package cate.common.table.activity.exorcism.row;

import cate.common.table.ERow;

import cate.common.table.XSSFRowWrap;
import cate.common.util.random.RWItem;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("驱魔之夜-小鬼")
public class ExorcismGhostRow extends ERow implements RWItem {

    @NoteField("tid")
    public int tid;

    @NoteField("配置ID")
    public int configTid;

    @NoteField("原型")
    public int protoId;

    @NoteField("品质")
    public int quality;

    @NoteField("血量")
    public long hp;

    @NoteField("固定奖励")
    public String fixRwdStr;

    @NoteField("随机奖励分组")
    public int randomRwdGroup;

    @NoteField("刷新权重")
    public double weight;

    @NoteField("挑战消耗")
    public String costStr;

    @Override
    public void parse(XSSFRowWrap xr) {
        this.id = xr.getInteger("ID", 0);
        this.tid = xr.getInteger("ID", 0);
        this.configTid = xr.getInteger("配置ID", 0);
        this.protoId = xr.getInteger("原型",0);
        this.quality = xr.getInteger("品质", 0);
        this.hp = xr.getLong("血量",100L);
        this.fixRwdStr = xr.getString("固定奖励");
        this.randomRwdGroup = xr.getInteger("随机奖励分组",0);
        this.weight =xr.getDouble("刷新权重", 0d);
        this.costStr = xr.getString("挑战消耗");
    }


    @Override
    public void decode() {

    }


    @Override
    public double getWeight() {
        return weight;
    }
}
